﻿using AutoMapper;
using Hotel.Common;
using Hotel.Domain;
using Hotel.IRepository;
using Hotel.IServices;
using Hotel.IServices.RequestDTO;
using Hotel.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Hotel.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class GoodsTypesController : ControllerBase
    {

        private readonly IAddGoodsTypes goodsTypes;
        private readonly ILogger<AddUserServuces> logger;
        private readonly IMapper mapper;

        public GoodsTypesController(IAddGoodsTypes goodsTypes, ILogger<AddUserServuces> logger, IMapper mapper)
        {
            this.goodsTypes = goodsTypes;
            this.logger = logger;
            this.mapper = mapper;
        }


        /// <summary>
        /// 添加商品类型
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        /// 
        [HttpPost("AddGoodsType")]
        public async Task<ApiResult> AddGoodsType(AddGoodsTypeDto dto)
        {
           return await goodsTypes.AddGoodsType(dto);
        }



       
    }
}
